package com.heima.cloud.mapper;

import com.heima.cloud.pojo.Order;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface OrderMapper {

    @Select("SELECT\n" +
            "\tid,\n" +
            "\ttotal_num totalNum,\n" +
            "\ttotal_money totalMoney,\n" +
            "\tshipping_code shippingCode,\n" +
            "\tshipping_name shippingName,\n" +
            "\tusername,\n" +
            "\tpay_money payMoney \n" +
            "FROM\n" +
            "\ttb_order \n" +
            "WHERE\n" +
            "\tusername = #{username}")
    List<Order> findOrderByUserId(@Param("username") String username);
}
